package com.igeek.boot.mapper;

import com.igeek.boot.entity.Permission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jwj
 * @since 2024-01-04
 */
@Mapper
public interface PermissionMapper extends BaseMapper<Permission> {
    @Select("select * from permission p join role_permission rp on p.id = rp.permission_id where rp.role_id=#{roleId}")
    public Set<Permission> findPermissionByRoleId(Integer roleId);
}
